<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row">
            <div class="layui-form">
                <fieldset class="layui-elem-field">
                    <legend>审批内容</legend>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题名称：</label>
                        <div class="layui-input-block">
                            <p th:text="${oa.title }" style="width:100%;padding: 10px;"></p>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">下达人：</label>
                        <div class="layui-input-block">
                            <p th:text="${oa.sendUserName }" style="width:100%;padding: 8px;"></p>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">内容：</label>
                        <div class="layui-input-block">
                            <p th:text="${oa.msgContent }" style="width:100%;padding: 8px;"></p>
                        </div>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field" style="margin-top: 30px;padding: 10px;">
                    <legend>回复内容</legend>
                    <ul class="layui-timeline">
                        <li class="layui-timeline-item" >
                            <i class="layui-icon layui-timeline-axis"></i>
                            <div class="layui-timeline-content layui-text">
                                <h3 class="layui-timeline-title" th:text="'由 '+${replay.sendUserName}+' 下达'"></h3>
                                <p th:text="'接收回复人：' + ${replay.receiveUserName}"></p>
                                <p th:if="${replay.msgType == 0}" th:text="下达类型：第一次下达"></p>
                                <p th:if="${replay.msgType == 1}" th:text="下达类型：二次转达"></p>
                                <p th:if="${replay.state == 0}" th:text="'回复状态: 未回复'"></p>
                                <p th:if="${replay.state == 1}" th:text="'回复状态: 已回复'"></p>
                                <p th:if="${replay.state == 1}" th:text="'回复内容：' + ${replay.replayContent}"></p>
                                <p th:if="${replay.state == 1}" th:text="'回复时间：' + ${replay.replayTime}"></p>
                            </div>
                            <form class="layui-form " id="formReplay" th:if="${replay.state == 0 && replay.receiveUserId == myUserId}">
                                <input type="hidden" name="id" th:value="${replay.id}">
                                <div class="layui-form-item layui-form-text" >
                                    <label class="layui-form-label">我的回复</label>
                                    <div class="layui-input-block">
                                        <textarea name="replayContent" placeholder="这里输入回复内容" class="layui-textarea"></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div style="text-align: center;">
                                        <button type="submit" onclick="update()" class="layui-btn layui-btn-xs layui-btn-normal">回复</button>
                                    </div>
                                </div>
                            </form>
                        </li>
                    </ul>
                </fieldset>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/oa/replay.js}"></script>
</body>
</html>
